﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Retirement_riskProfiler : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
        
    }
    protected void btn_submit_Click(object sender, ImageClickEventArgs e)
    {
        int totalScore = this.getTotalScore();

        this.Response.Redirect("./riskResult.aspx?totalScore=" + totalScore);
    }

    public int getTotalScore()
    {

        int totalScore = 0;

        if (this.riskProfiler_1a.Checked)
        {

            totalScore += 1;
        }

        if (this.riskProfiler_1b.Checked)
        {

            totalScore += 2;
        }
        if (this.riskProfiler_1c.Checked)
        {

            totalScore += 3;
        }

        if (this.riskProfiler_2a.Checked)
        {

            totalScore += 1;
        }

        if (this.riskProfiler_2b.Checked)
        {

            totalScore += 2;
        }
        if (this.riskProfiler_2c.Checked)
        {

            totalScore += 3;
        }

        if (this.riskProfiler_3a.Checked)
        {

            totalScore += 1;
        }

        if (this.riskProfiler_3b.Checked)
        {

            totalScore += 2;
        }
        if (this.riskProfiler_3c.Checked)
        {

            totalScore += 3;
        }

        if (this.riskProfiler_4a.Checked)
        {

            totalScore += 1;
        }

        if (this.riskProfiler_4b.Checked)
        {

            totalScore += 2;
        }
        if (this.riskProfiler_4c.Checked)
        {

            totalScore += 3;
        }

        if (this.riskProfiler_5a.Checked)
        {

            totalScore += 1;
        }

        if (this.riskProfiler_5b.Checked)
        {

            totalScore += 2;
        }
        if (this.riskProfiler_5c.Checked)
        {

            totalScore += 3;
        }


        if (this.riskProfiler_6a.Checked)
        {

            totalScore += 1;
        }

        if (this.riskProfiler_6b.Checked)
        {

            totalScore += 2;
        }
        if (this.riskProfiler_6c.Checked)
        {

            totalScore += 3;
        }

        if (this.riskProfiler_7a.Checked)
        {

            totalScore += 1;
        }

        if (this.riskProfiler_7b.Checked)
        {

            totalScore += 2;
        }
        if (this.riskProfiler_7c.Checked)
        {

            totalScore += 3;
        }

        if (this.riskProfiler_8a.Checked)
        {

            totalScore += 1;
        }

        if (this.riskProfiler_8b.Checked)
        {

            totalScore += 2;
        }
        if (this.riskProfiler_8c.Checked)
        {

            totalScore += 3;
        }

        return totalScore;
    }
}